﻿Public Class frmPagoJuego

    Dim Precio(5) As Double

    Private Sub frmPagoJuego_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        PictureBox1.ImageLocation = frmListaJuegos.PictureBox1.ImageLocation
       
        ComboBox1.SelectedText = frmListaJuegos.GroupBox2.Text
        ComboBox1.SelectedText = frmListaJuegos.GroupBox1.Text

        NIVEL.Items.Clear()
        NIVEL.Items.Add("CASINO PRIMIUM")
        NIVEL.Items.Add("SUPER CASINO")
        NIVEL.Items.Add("CASINO NORMAL")

        Precio(0) = 159.9
        Precio(1) = 95.5
        Precio(2) = 78.0
        Precio(3) = 87.0
        Precio(4) = 99.0
        Precio(5) = 82.0
        NIVEL.Text = NIVEL.Items.Item(0)
    End Sub

    

    Private Sub ComboBox2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NIVEL.SelectedIndexChanged
        TextBox2.Text = Format(Precio(NIVEL.SelectedIndex), "0.00")
        TextBox1.Focus()
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        TextBox3.Text = CStr(Val((TextBox1.Text) * Val(TextBox2.Text)))

    End Sub

    Private Sub TextBox1_TextChanged_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
        If TextBox1.Text <> "" Then
            Button1.Enabled = True
        Else

            Button1.Enabled = False
        End If
    End Sub

    Private Sub TextBox1_Validated(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox1.Validated
        If TextBox1.Text = "" Then TextBox1.Focus()
    End Sub
End Class
